/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package View;

import View.LoginJFrame;

/**
 *
 * @author wolkan
 */
public class MainJFrame extends javax.swing.JFrame {

    /**
     * Creates new form MainJFrame
     */
    public MainJFrame() {
        initComponents();
        cmd_icon.setEnabled(false);
    }
    
    

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        cmd_icon = new javax.swing.JButton();
        cmd_Login = new javax.swing.JButton();
        cmd_Order = new javax.swing.JButton();
        cmd_Admin = new javax.swing.JButton();
        cmd_SMPS = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        getContentPane().setLayout(new java.awt.GridLayout(1, 0));

        cmd_icon.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmd_iconActionPerformed(evt);
            }
        });
        getContentPane().add(cmd_icon);

        cmd_Login.setText("Login");
        cmd_Login.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmd_LoginActionPerformed(evt);
            }
        });
        getContentPane().add(cmd_Login);

        cmd_Order.setText("Order");
        cmd_Order.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmd_OrderActionPerformed(evt);
            }
        });
        getContentPane().add(cmd_Order);

        cmd_Admin.setText("Admin");
        cmd_Admin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmd_AdminActionPerformed(evt);
            }
        });
        getContentPane().add(cmd_Admin);

        cmd_SMPS.setText("SMPS");
        cmd_SMPS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmd_SMPSActionPerformed(evt);
            }
        });
        getContentPane().add(cmd_SMPS);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void cmd_iconActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmd_iconActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cmd_iconActionPerformed

    private void cmd_AdminActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmd_AdminActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cmd_AdminActionPerformed

    private void cmd_LoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmd_LoginActionPerformed
        // TODO add your handling code here:
        LoginJFrame s= new LoginJFrame();
            s.setVisible(true);
           
        
        
    }//GEN-LAST:event_cmd_LoginActionPerformed

    private void cmd_OrderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmd_OrderActionPerformed
        // TODO add your handling code here:
        // cmd_order.setEnabled(false);
    }//GEN-LAST:event_cmd_OrderActionPerformed

    private void cmd_SMPSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmd_SMPSActionPerformed
        // TODO add your handling code here:
        SMPSJFrame s= new SMPSJFrame();
            s.setVisible(true);
    }//GEN-LAST:event_cmd_SMPSActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(MainJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(MainJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(MainJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(MainJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainJFrame().setVisible(true);
            }
        });
    }
    
    public void  setBE(){
        cmd_Order.setEnabled(true);
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton cmd_Admin;
    private javax.swing.JButton cmd_Login;
    private javax.swing.JButton cmd_Order;
    private javax.swing.JButton cmd_SMPS;
    private javax.swing.JButton cmd_icon;
    // End of variables declaration//GEN-END:variables
}
